﻿/*----------------------------------------------------------------
    // Copyright (C) 2009 江苏华招网
    // 版权所有。 
    // 作者：庄金冬 
    //
    // 文件名：IBLL_HospitalProcureCatalog.cs
    // 文件功能描述：医疗机构自身采购目录处理接口
    // 创建标识：庄金冬2009-03-06
    //
    // 修改标识：
    // 修改描述：
    //
    // 修改标识：
    // 修改描述：
    //
    // 审核人：
    // 审核时间：
    // 审核说明：
 //----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using HZ.DrugTrade.Model;

namespace HZ.DrugTrade.IBLL
{
    public interface IBLL_HospitalProcureCatalog
    {
        #region 采购目录操作
        /// <summary>
        /// 医疗机构增加一个采购目录
        /// </summary>
        /// <param name="hospitalprocurecatalog">医疗机构采购目录(医疗机构编号，采购目录编号必填)</param>
        int AddHospitalProcureCatalog(HospitalProcureCatalog hospitalprocurecatalog);



        /// <summary>
        /// 医疗机构增加一个采购目录(批量)
        /// </summary>
        /// <param name="hospitalprocurecatalogList">医疗机构采购目录(医疗机构编号，采购目录编号必填)</param>
        int AddHospitalProcureCatalog_Batch(IList<HospitalProcureCatalog> hospitalprocurecatalogList);

        /// <summary>
        /// 撤废医疗机构采购目录
        /// </summary>
        /// <param name="hospitalprocurecatalog">医疗机构采购目录(医疗机构编号，采购目录编号必填)</param>
        int InvalidateHospitalProcureCatalog(HospitalProcureCatalog hospitalprocurecatalog);


        /// <summary>
        /// 撤废医疗机构采购目录(批量)
        /// </summary>
        /// <param name="hospitalprocurecatalogList">医疗机构采购目录(医疗机构编号，采购目录编号必填)</param>
        int InvalidateHospitalProcureCatalog_Batch(IList<HospitalProcureCatalog> hospitalprocurecatalogList);

        /// <summary>
        /// 恢复医疗机构采购目录
        /// </summary>
        /// <param name="hospitalprocurecatalog">医疗机构采购目录(医疗机构编号，采购目录编号必填)</param>
        int ValidateHospitalProcureCatalog(HospitalProcureCatalog hospitalprocurecatalog);

        /// <summary>
        /// 恢复医疗机构采购目录(批量)
        /// </summary>
        /// <param name="hospitalprocurecatalogList">医疗机构采购目录(医疗机构编号，采购目录编号必填)</param>
        int ValidateHospitalProcureCatalog_Batch(IList<HospitalProcureCatalog> hospitalprocurecatalogList);

        /// <summary>
        /// 更新医疗机构采购产品零售价
        /// </summary>
        /// <param name="hospitalprocurecatalog"></param>
        /// <returns></returns>
        int UpdateHospitalProcureCatalogSellPrice(HZ.DrugTrade.Model.HospitalProcureCatalog hospitalprocurecatalog);

        /// <summary>
        /// 更改医疗机构产品的配送企业，及实际采购价格
        /// </summary>
        /// <param name="hospitalprocurecatalog"></param>
        /// <returns></returns>
        int UpdateHospitalProcureCatalogCompanyPS(HZ.DrugTrade.Model.HospitalProcureCatalog hospitalprocurecatalog);

        /// <summary>
        /// 获取不在医疗机构采购目录中的系统采购目录
        /// </summary>
        /// <param name="query"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        IList<HZ.DrugTrade.Model.View.ProcureCatalog> GetProcureCatalogNotInCurrentCatalog(HZ.DrugTrade.Model.Query.HospitalProcureCatalog query, int currentpage, int pagesize, out int totalrecord);

        #endregion

        #region 医疗机构自身采购目录查询
        /// <summary>
        /// 条件获取医疗机构自身采购目录(带分页)
        /// </summary>
        /// <param name="query">查询对象</param>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">页大小</param>
        /// <param name="totalrecord">记录总数</param>
        /// <returns>结果集</returns>
        IList<HZ.DrugTrade.Model.View.HospitalProcureCatalog> GetHospitalProcureCatalog(HZ.DrugTrade.Model.Query.HospitalProcureCatalog query, int currentpage, int pagesize, out int totalrecord);
        

        #endregion

       #region 采购目录查询
        /// <summary>
        /// 条件获取医疗机构自身采购目录(带分页)
        /// </summary>
        /// <param name="query">查询对象</param>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">页大小</param>
        /// <param name="totalrecord">记录总数</param>
        /// <returns>结果集</returns>
        IList<HZ.DrugTrade.Model.View.HospitalProcureCatalog> GetAreaProductByWhere(HZ.DrugTrade.Model.Query.HospitalProcureCatalog query, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 检测医疗机构和配送企业是否发生配送关系 发生配送交易禁止删除
        /// </summary>
        /// <param name="HospitalID"></param>
        /// <param name="CompanyID_PS"></param>
        /// <returns></returns>
        bool GetBooleanHospitalPurchaseOrder(HZ.DrugTrade.Model.Query.HospitalProcureCatalog where);
        #endregion

         /// <summary>
        /// 查看医疗机构实际价格历史记录
        /// add by Meng 2013-04-22
        /// </summary>
        /// <param name="where"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalPriceLog(string where, int currentpage, int pagesize, out int totalrecord);
    }
}
